//
//  HotImageVewCell.m
//  FloatClouds
//
//  Created by 黄威 on 16/8/31.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import "HotImageVewCell.h"

@implementation HotImageVewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    
    if (self) {
        
        
        self.cycleScrollView2 = [[SDCycleScrollView alloc]init];
        self.cycleScrollView2.currentPageDotColor = [UIColor whiteColor];
        [self addSubview:self.cycleScrollView2];
        self.cycleScrollView2.userInteractionEnabled = YES;
        
        
    }

    return self;
}


-(void)layoutSubviews{

    
    [super layoutSubviews];
    
    self.cycleScrollView2.frame = CGRectMake(0, 0,self.bounds.size.width, (self.bounds.size.width / 1.8));
    self.cycleScrollView2.delegate = self;
    
   self.cycleScrollView2.pageControlAliment = SDCycleScrollViewPageContolAlimentRight;
    self.cycleScrollView2.titlesGroup = self.titles;
   self.cycleScrollView2.imageURLStringsGroup = self.imagesURLStrings;
  



}

- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
{
    NSString *indexNumber = [NSString stringWithFormat:@"%lu",index];
    
    [[NSNotificationCenter defaultCenter]postNotificationName:@"indexNumber" object:indexNumber];
    
    
    
    
}


@end
